import React, { Component } from "react";
interface IUser {
  age: number;
}
interface IProps {
  name: string;
  age?: number;
  auth?: boolean;
  user?: IUser;
}
export default class Hee extends Component<IProps, any> {
  render() {
    return (
      <div>
        <p>子组件{this.props.name}</p>
        <p>{this.props.age}</p>
        {this.props.auth ? <p>给我了</p> : null}
        <p>{this.props.user?.age}</p>
      </div>
    );
  }
}
